﻿//using System;
using System.Collections.Generic;
using System.Text;

namespace Apewer.Internals
{

    internal class Constant
    {

        #region Byte[]

        /// <summary>空字节数组。</summary>
        public static readonly byte[] EmptyBytes = new byte[0];

        /// <summary>UTF-8 BOM。</summary>
        public static byte[] Bom { get => new byte[] { 0xEF, 0xBB, 0xBF }; }

        #endregion

        #region String

        /// <summary>空字符串。</summary>
        public const string EmptyString = "";

        /// <summary>换行符，由 ASCII 13 和 ASCII 10 组成。</summary>
        public const string LineFeed = "\r\n";

        /// <summary>空白半角字符。</summary>
        public const string BlankDbcCaseChars = " \n\r\t\b\f";

        /// <summary>空白全角字符。</summary>
        public const string BlankSbcCaseChars = "　";

        /// <summary>所有易识别的字符，包含大写字母和数字。</summary>
        public const string LucidCollection = "3456789acefhknpstwxyz";

        /// <summary>所有 GUID 中的字符，包含字母、数字和连字符。</summary>
        public const string GuidCollection = "0123456789ABCDEFabcdef-";

        /// <summary>所有主键字符。</summary>
        public const string KeyCollection = "0123456789abcdefghijklmnopqrstuvwxyz";

        /// <summary>所有十六进制字符。</summary>
        public const string HexCollection = "0123456789abcdef";

        /// <summary>所有数字（ASCII 48 ~ 57）。</summary>
        public const string NumberCollection = "0123456789";

        /// <summary>所有数字（ASCII 48 ~ 57）。</summary>
        public const string NumericCollection = "0123456789";

        /// <summary>所有小写字母（ASCII 97 ~ 122）。</summary>
        public const string LowerCollection = "abcdefghijklmnopqrstuvwxyz";

        /// <summary>所有大写字母（ASCII 65 ~ 90）。</summary>
        public const string UpperCollection = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";

        /// <summary>所有字母。</summary>
        public const string LetterCollection = LowerCollection + UpperCollection;

        /// <summary>注入字符默认黑名单。</summary>
        public const string InjectDefaultBlackList = "\"'`\b\f\n\r\t\\/:*?<>|@";

        /// <summary>注入字符黑名单。</summary>
        public const string InjectJsonBlackList = "\\\"'\b\f\n\r\t/@";

        #endregion

        #region Preset Property

        /// <summary>TCP 传输缓冲区大小。</summary>
        public const int TcpBufferSize = 8191;

        /// <summary>默认的缓冲区容量。</summary>
        public const int DefaultBufferCapacity = 1024;

        #endregion

    }

}
